// SETUP

#include intrographics.txt
#include ladyluckbiggraphics.txt

setdatapath("data/graphics/cutscenes/warrior/");

var warriorgraphics = {
	idle: {
		animation: "warrior_idle.json",
		pack: "warrior.pck",
		loop: true
	},
	worried_idle: {
		animation: "warrior_worried_idle.json",
		pack: "warrior.pck",
		loop: true
	}
}
var warrior = addsprite("warrior", 1, warriorgraphics);

// HELPER FUNCTIONS	

var fade_time = 0.4;

// ACTORS
actor("Lady Luck", screenwidthmid + 800, 550, Col.YELLOW, CENTER, BOTTOM, "chat_ladyluck", "characters/misc/charicon_ladyluck");
actor("Warrior", 2670, 670, Col.LIGHTBLUE, CENTER, BOTTOM, "chat_warrior", "characters/warrior/charicon_warrior");

// INTRO

play("music_cutscene_dark");

warrior.scale = 0.5;
warrior.x = 2670 - ((warrior.getwidth("idle") * warrior.scale) / 2);
warrior.y = 700;
changebackground("intro_stage");
fadein();
warrior.show("idle");

ladyluck_big.x = -screenwidth;
ladyluck_big.show("idle");
Actuate.tween(ladyluck_big, 2, { x: 0 }).ease(Expo.easeOut);

wait(0.5);

ladyluck_big.show("talking", true);
actor("Lady Luck", screenwidthmid + 240, screenheightmid - 240, Col.YELLOW, RIGHT, BOTTOM, "chat_ladyluck", "characters/misc/charicon_ladyluck");
speak("Lady Luck", "Warrior, my love! How are you getting on?");
speak("Lady Luck", "You know, if you stop fighting against me and start|working really hard on being a good minion...");
speak("Lady Luck", "...then in a couple hundred years you might|have a shot at becoming a level boss.");
ladyluck_big.show("idle", true);

speak("Warrior", "What? No! I’m getting on fine!");
speak("Warrior", "I'm going to win this!");

ladyluck_big.show("talking", true);
actor("Lady Luck", screenwidthmid + 240, screenheightmid - 240, Col.YELLOW, RIGHT, BOTTOM, "chat_ladyluck", "characters/misc/charicon_ladyluck");
speak("Lady Luck", "You’re really not, you know.");
ladyluck_big.show("idle", true);

speak("Warrior", "And that's another thing!");
speak("Warrior", "I’m beginning to think you might not|have our best interests at heart!");

ladyluck_big.show("talking-sly", true);
actor("Lady Luck", screenwidthmid + 240, screenheightmid - 280, Col.YELLOW, RIGHT, BOTTOM, "chat_ladyluck", "characters/misc/charicon_ladyluck");
speak("Lady Luck", "...You’re not the smartest of my little battlers, are you?");
speak("Lady Luck", "Of course I don't have your best interests at heart.");
ladyluck_big.show("talking-scary", true);
speak("Lady Luck", "I don't even have a heart to *theoretically*|have them at in the first place.");
speak("Lady Luck", "But what I do have is... more monsters for|you to fight! In you go!");
ladyluck_big.show("idle-scary", true);

startgamefromcutscene();